﻿Imports Icidis.Wow
Public Class frmMain
    Private oWowArmoury As New Armory.ArmoryParser(Armory.Enums.Region.Europe, "Saurfang")
    Private Sub btnGetCharacter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetCharacter.Click
        Try
            Dim oCharacter As Armory.Character = oWowArmoury.GetCharacterInfo(txtCharacterName.Text.Trim)
            With oCharacter
                wbCharacterModel.Navigate(.CharacterModelURL)
            End With
        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString, "Error Getting Character Info", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Private Sub btnGetGuild_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetGuild.Click
        Try
            Dim oGuild As Armory.Guild = oWowArmoury.GetGuildInfo(txtGuildName.Text.Trim)
            grdGuildRoster.DataSource = oGuild.Members
        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString, "Error Getting Guild Info", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

End Class
